import request from '@/utils/request'

// 查询元器件故障信息列表
export function listFailure(query) {
  return request({
    url: '/scan/failure/list',
    method: 'get',
    params: query
  })
}

// 查询元器件故障信息详细
export function getFailure(id) {
  return request({
    url: '/scan/failure/' + id,
    method: 'get'
  })
}

// 新增元器件故障信息
export function addFailure(data) {
  return request({
    url: '/scan/failure',
    method: 'post',
    data: data
  })
}

// 修改元器件故障信息
export function updateFailure(data) {
  return request({
    url: '/scan/failure',
    method: 'put',
    data: data
  })
}

// 删除元器件故障信息
export function delFailure(id) {
  return request({
    url: '/scan/failure/' + id,
    method: 'delete'
  })
}
